#-*- encoding:utf-8 -*-

# Definition for a binary tree node.
class TreeNode(object):
    def __init__(self, x):
        self.val = x
        self.left = None
        self.right = None

def sumOfLeftLeaves():
    ans = 0
    if root is not None:
        if root.left is not None and root.left.left is None and root.left.right is None:
            ans += root.left.val
        if root.left is not None:
            ans += self.sumOfLeftLeaves(root.left)
        if root.right is not None:
            ans += self.sumOfLeftLeaves(root.right)
    return ans
           